import {
	defineStore
} from 'pinia';
import {
	basePinia
} from "./index.js";

export const usePinia = defineStore('user', {
	state: () => {
		return {
			token: ''
			// userInfo: {}
		}
	},
	actions: {
		setToken(token) {
			this.token = token
		}

	},
	getters: {
		$token() {
			return this.token || ''
		}
	}
})

export const useStore = usePinia(basePinia);